package cn.gx.learn.security_boot_jwt_websocket.appiontment.dal.data;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.ibatis.type.EnumTypeHandler;

import java.time.LocalDate;
import java.time.LocalDateTime;

@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "appiontment")
public class AppiontmentDO {

    @TableId(type = IdType.AUTO)
    private Long id;

    private Long userId;

    private String appionter;

    private String phone;

    private String description;

    @TableField(typeHandler = EnumTypeHandler.class)
    private AppiontType type;

    private LocalDateTime createTime;

    private LocalDateTime endTime;

    private Integer status;

    private LocalDate day;

    public enum AppiontType{
        STUDY,
        COSPLAY,
        DINNER,
        TRAVEL
    }

}
